#include "Bomb.h"

Bomb::Bomb(int locx, int locy, int locz,vector<vector<vector<Floor*>>> floor)
{
	collision = false;
	dir = NODIR;
	theFloor = floor;
	x = locx;
	y = locy;
	z = locz;
	type = BOMB;	
	removeable = false;
}

Bomb::~Bomb(void)
{
}




//When an this object is hit by the collider do certain stuff
void Bomb::collide(Object* collider)
{
	//assume that collision will be over (if its not it'll flag itself again)
	collision=false;
	if(collider->getType() == BLOCK){		
		removeable = true;
		theFloor[x][y][z]->changeObject(NONE);
	}

}

//When this object hits another object do certain stuff (ie if its an exit win the game)
void Bomb::collideWith(Object* collidee){
	//All collisions must end by flagging collision as false
	collision = false;
}
void Bomb::doFloor(Equip currentEquip){

	condition = FINE;
	if(theFloor[x][y][z] ->getType() == WATER){
		removeable = true;
	}

}